package com.framework.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.framework.mybatis.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@TableName(value = "sys_log")
public class SysLog extends BaseEntity {
    @ApiModelProperty(value = "用户名")
    @TableField(value = "`userid`")
    private String userid;

    @ApiModelProperty(value = "用户姓名")
    @TableField(value = "`name`")
    private String name;

    @ApiModelProperty(value = "方法")
    @TableField(value = "`method`")
    private String method;

    @ApiModelProperty(value = "方法路径")
    @TableField(value = "`uri`")
    private String uri;

    @ApiModelProperty(value = "系统")
    @TableField(value = "`os_name`")
    private String osName;

    @ApiModelProperty(value = "ip地址")
    @TableField(value = "`ip`")
    private String ip;

    @ApiModelProperty(value = "日志类型 登录日志 操作日志")
    @TableField(value = "`log_type`")
    private String logType;

    @ApiModelProperty(value = "执行时长 秒")
    @TableField(value = "`spend_time`")
    private Integer spendTime;

    @ApiModelProperty(value = "操作说明")
    @TableField(value = "`operation`")
    private String operation;

    @ApiModelProperty(value = "url")
    @TableField(value = "`url`")
    private String url;

    @ApiModelProperty(value = "参数")
    @TableField(value = "`params`")
    private String params;

    @ApiModelProperty(value = "浏览器")
    @TableField(value = "`user_agent`")
    private String userAgent;

    @ApiModelProperty(value = "接口返回值")
    @TableField(value = "`result`")
    private String result;
}
